using System.Web;
using System.Web.UI.WebControls;

namespace METU_CMT.Business
{
    class Administrator : Instructor
    {
        public Administrator(int userId)
        {
            UsersTableAdapter _usersTableAdapter = new UsersTableAdapter();
            UserName = _usersTableAdapter.GetUserName(userId);
            UserId = userId;
            Name = _usersTableAdapter.GetName(userId);
            Surname = _usersTableAdapter.GetSurname(userId);
            Email = _usersTableAdapter.GetEMail(userId);
            PhotoFile = _usersTableAdapter.GetPhotoFilePath(userId);
        }

        public override void GoToProfilePage(HttpResponse response)
        {
            response.Redirect("AddNewUserScreen.aspx");
        }

        public override void SetHome(MenuItem menuItem)
        {
            menuItem.NavigateUrl = "~/AddNewUserScreen.aspx";
        }
    }
}